package com.lpit.controller;

import com.lpit.dto.UserAndTableTheBehaviorDto;
import com.lpit.result.ResponseResult;
import com.lpit.service.GiveAlikeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @apiNote 对文章的点赞行为
 * @author Administrator
 * @version 1.0.1
 */
@RestController
public class GiveAlikeController {
    @Autowired
    private GiveAlikeService giveAlikeService;
    /**
     * 对文章的点赞行为
     * @param userAndTableTheBehaviorDto
     * @return ResponseResult<Integer>
     */
    @GetMapping("/giveLike")
    public ResponseResult<Integer> giveLike(@RequestBody UserAndTableTheBehaviorDto userAndTableTheBehaviorDto){
        return giveAlikeService.giveAlike(userAndTableTheBehaviorDto);
    }
}
